package com.reactor.flux;

import reactor.core.publisher.Flux;

public class FluxDemo2 {

	//在一次调用中就产生了全部的 10 个元素。
	public static void main(String[] args) {
		Flux.create(sink -> {
		    for (int i = 0; i < 10; i++) {
		        sink.next(i);
		    }
		    sink.complete();
		}).subscribe(System.out::println);
	}

}
